@extends('admin/category/layout')


@section('main')
    <div class="page-header clearfix">
        <h1 class="pull-left">分类管理</h1>
        <button class="btn btn-info btn-sm pull-right" data-toggle="modal" data-url="{{ url('admin/category/create') }}" data-target="#modal"><span class="glyphicon glyphicon-plus"></span> 添加分类</button>
    </div>
    <table class="table table-striped">
        <tr>
            <th width="45%">分类名称</th>
            <th width="20%">编码</th>
            <th width="10%">显示序号</th>
            <th width="20%">操作</th>
        </tr>
        @forelse($list as $vo)
            <tr>
                <td>
                    {{ $vo->title }}
                </td>
                <td>
                    {{ $vo->name }}
                </td>
                <td>
                    {{ $vo->sort }}
                </td>
                <td>
                    <a href="javascript:;" class="btn btn-default btn-sm" data-url="/Admin/ArticleCategory/editAction/id/13" data-toggle="modal" data-target="#modal"><i class="glyphicon glyphicon-edit"></i> 编辑</a>
                    <a href="javascript:;" class="btn btn-default btn-sm" data-url="/Admin/ArticleCategory/createAction/parentId/13" data-toggle="modal" data-target="#modal"><i class="glyphicon glyphicon-plus"></i> 添加子分类</a>
                </td>
            </tr>
        @empty
            <tr>
                <td colspan="20">
                    <div class="empty">暂无页面记录</div>
                </td>
            </tr>
        @endforelse
    </table>
@endsection